package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.ROrgRiskHistory;
import com.ruoyi.system.mapper.ROrgRiskHistoryMapper;
import com.ruoyi.system.service.IROrgRiskHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 风险历史记录统计标Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-25
 */
@Service
@DataSource(value = DataSourceType.SLAVE)
public class ROrgRiskHistoryServiceImpl implements IROrgRiskHistoryService 
{
    @Autowired
    private ROrgRiskHistoryMapper rOrgRiskHistoryMapper;

    /**
     * 查询风险历史记录统计标
     * 
     * @param id 风险历史记录统计标主键
     * @return 风险历史记录统计标
     */
    @Override
    public ROrgRiskHistory selectROrgRiskHistoryById(Long id)
    {
        return rOrgRiskHistoryMapper.selectROrgRiskHistoryById(id);
    }

    /**
     * 查询风险历史记录统计标列表
     * 
     * @param rOrgRiskHistory 风险历史记录统计标
     * @return 风险历史记录统计标
     */
    @Override
    public List<ROrgRiskHistory> selectROrgRiskHistoryList(ROrgRiskHistory rOrgRiskHistory)
    {
        return rOrgRiskHistoryMapper.selectROrgRiskHistoryList(rOrgRiskHistory);
    }

    @Override
    public List<ROrgRiskHistory> selectVehicleValueList(ROrgRiskHistory rOrgRiskHistory) {
        return rOrgRiskHistoryMapper.selectVehicleValueList(rOrgRiskHistory);
    }

    @Override
    public List<ROrgRiskHistory> selectFireValueList(ROrgRiskHistory rOrgRiskHistory) {
        return rOrgRiskHistoryMapper.selectFireValueList(rOrgRiskHistory);
    }

    @Override
    public List<ROrgRiskHistory> selectActionValueList(ROrgRiskHistory rOrgRiskHistory) {
        return rOrgRiskHistoryMapper.selectActionValueList(rOrgRiskHistory);
    }

    @Override
    public List<ROrgRiskHistory> selectToolValueList(ROrgRiskHistory rOrgRiskHistory) {
        return rOrgRiskHistoryMapper.selectToolValueList(rOrgRiskHistory);
    }

    /**
     * 新增风险历史记录统计标
     * 
     * @param rOrgRiskHistory 风险历史记录统计标
     * @return 结果
     */
    @Override
    public int insertROrgRiskHistory(ROrgRiskHistory rOrgRiskHistory)
    {
        return rOrgRiskHistoryMapper.insertROrgRiskHistory(rOrgRiskHistory);
    }

    /**
     * 修改风险历史记录统计标
     * 
     * @param rOrgRiskHistory 风险历史记录统计标
     * @return 结果
     */
    @Override
    public int updateROrgRiskHistory(ROrgRiskHistory rOrgRiskHistory)
    {
        return rOrgRiskHistoryMapper.updateROrgRiskHistory(rOrgRiskHistory);
    }

    /**
     * 批量删除风险历史记录统计标
     * 
     * @param ids 需要删除的风险历史记录统计标主键
     * @return 结果
     */
    @Override
    public int deleteROrgRiskHistoryByIds(String ids)
    {
        return rOrgRiskHistoryMapper.deleteROrgRiskHistoryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除风险历史记录统计标信息
     * 
     * @param id 风险历史记录统计标主键
     * @return 结果
     */
    @Override
    public int deleteROrgRiskHistoryById(Long id)
    {
        return rOrgRiskHistoryMapper.deleteROrgRiskHistoryById(id);
    }
}
